<?php

namespace App\Http\Requests\Home;

use App\Http\Requests\Request;

class UserinfoRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
            'uname' => 'required',
            'ufname' => 'required',
            'ufsex'=>'required',
            'ufbirthday'=>'required'
        ];
    }

    public function messages()
    {
        return [
           'uname.required'=>'用户名必填',
           'ufname.required' => '真实姓名必填',
           'ufsex.required'=>'性别必填',
           'urepassword.required'=>'生日必填'
           ];
    }
}
